package cn.wsalix.msg.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import cn.anlaser.repository.CommonRepository;
import cn.wsalix.msg.entity.MessRapport;
import cn.wsalix.msg.entity.Message;

public interface MessRapportRepository extends CommonRepository<MessRapport> {
	@Query("select mr.message from MessRapport mr where mr.type='product' and mr.receive.id=:userId and mr.fkId=:fkId")
	List<Message> findProMess(@Param("userId") Long userId,
			@Param("fkId") Long fkId);

}
